import os


class ConfigData(object):
    def __init__(self):
        self.affectedSide = 'left'
        self.dataSetPath = os.path.abspath(os.getcwd()) + r'/data_set'
        self.comNumSet = {'left': 38, 'right': 20}  # 端口号
        self.trainModelPath = ''
        self.saveDataPath = ''
        self.withoutPredDur = 1  # without Predict Feedback Duration: 1s
        self.sessionTypeSet = ["acquisition", "online"]
        self.cuePathSet = {
            'left': [r'\cue_material\left1.mp4', r'\cue_material\left2.mp4'],
            'right': [r'\cue_material\right1.mp4', r'\cue_material\right2.mp4']
        }
        self.cueSetting = {
            'firstClassNum': 10,
            'secondClassNum': 10,
            'baselineDuration': 5,
            'waitCueDuration': 2,
            'dispCueDuration': 16,
            'repeatCue': 2,
            'auditoryIsChecked': True
        }
        self.exoskeleton = {
            'exoskeletonFeedback': True,
            'controlStrategyTrial': False,
            'controlStrategyEpoch': True,  # Trial和Epoch仅能有1个True
            'lowestPoint': 60,  # 最低点
            'highestPoint': 0,  # 最高点
            'velocity': 30,
        }

    def set_affected_side(self, side):
        if side == '左':
            self.affectedSide = 'left'
        else:
            self.affectedSide = 'right'
